<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title><?php echo Mandrill::getApp()->title; ?></title>
        <?php echo $mlStylesheets; ?>
        <?php echo $mlScripts; ?>
    </head>
    <body>
        <div class="ml-admin-header">
            <ul class="ml-admin-header-title">
                <li><h1><?php echo Mandrill::getApp()->title; ?></h1></li>
            </ul>
            <ul class="ml-admin-header-link">
                <li><a id="lnkIndex" href="<?php echo __route('ml-admin'); ?>"><?php echo __t('mandrill.admin.controlPanel'); ?></a></li>
                <li><a id="lnkModule" href="<?php echo __route('ml-admin/module'); ?>"><?php echo __t('mandrill.admin.modules'); ?></a></li>
                <li><a id="lnkPlugin" href="<?php echo __route('ml-admin/plugin'); ?>"><?php echo __t('mandrill.admin.plugins'); ?></a></li>
                <li><a id="lnkSetting" href="<?php echo __route('ml-admin/setting'); ?>"><?php echo __t('mandrill.admin.settings'); ?></a></li>
                <li class="align-right"><a href="<?php echo __route('ml-admin/home/logout'); ?>"><?php echo __t('mandrill.admin.logout'); ?></a></li>
                <?php if (isset($mlOptions)): ?><li class="align-right"><a class="ml-admin-show-options" href="#"><?php echo __t('mandrill.admin.showOptions'); ?></a></li><?php endif; ?>
            </ul>
        </div>
        <div class="ml-admin-options" <?php echo (isset($mlOptions))?'style="display: block;"':''; ?> >
            <?php if (isset ($mlOptions))echo $mlOptions; ?>
        </div>
        <div class="ml-admin-menu">
            <ul class="ml-admin-menu-list">
                <li class="ml-admin-menu-item">
                    <div class="ml-admin-user">
                        <div class="ml-admin-user-img"></div>
                        <div class="ml-admin-user-name"><?php echo MSession::getInstance()->getValue('login'); ?></div>
                    </div>
                </li>
                <?php if (isset($installedModules) && !empty($installedModules)): ?>
                <?php 
                foreach ($installedModules as $module){
                    echo __tag('li', array('class'=>'ml-admin-menu-item'), 
                            __tag('a', array('class'=>'ml-admin-menu-link', 'href'=>'?r=ml-admin&module='.$module->name), 
                                __t('mandrill.module.name', NULL, $module->name, 'modules')
                                )
                            );
                }
                ?>
                <?php endif; ?>
            </ul>
        </div>
        <div class="ml-admin-content">
            <?php echo $mlContent; ?>
        </div>
    </body>
</html>